package com.hero.zara.biz.dal.ibatis.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.hero.zara.biz.dal.data.TBSellerMemberDO;
import com.hero.zara.biz.dal.ibatis.TBSellerMemberDAO;

/**
 * @author maxjcs
 *
 */
public class IBatisTBSellerMemberDAO extends SqlMapClientDaoSupport implements TBSellerMemberDAO {

	public void insert(TBSellerMemberDO tbmemberDO) {
		this.getSqlMapClientTemplate().insert("MS-INSERT-TB-SELLER-MEMBER", tbmemberDO);
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	public TBSellerMemberDO queryByMemberId(String nick) {
		Map param=new HashMap();
		param.put("nick", nick);
		return (TBSellerMemberDO)this.getSqlMapClientTemplate().queryForObject("MS-QUYERY-MEMBER-BY-NICK", param);
	}

	public void update(TBSellerMemberDO tbmemberDO) {
		this.getSqlMapClientTemplate().update("MS-UPDAGTE-TB-SELLER-MEMBER", tbmemberDO);
	}


}
